// 导出vuex的user模块=》对象
export default {
  // 加个锁
  namespaced: true,
  state: {
    name: '小红',
    age: 18
  },
  mutations: {
    // 修改年龄
    setAge (state, payload) {
      console.log('模块user:', state, payload)
      state.age = payload
    }
  }
}
